package dbmodels

import (
	"time"
)

type CreateTimeField struct {
	Ctime time.Time `json:"create_time,omitempty" gorm:"column:create_time;comment:创建时间; <-:create;autoCreateTime"`
}

type CreateTimeFieldShow struct {
	Ctime time.Time `json:"create_time" gorm:"column:create_time;comment:创建时间; <-:create;autoCreateTime"`
}

type CreatorIdField struct {
	CreatorId int `json:"creator_id,omitempty" gorm:"column:creator_id;comment:创建人Id;type:int"`
}

type CreatorIdFieldShow struct {
	CreatorId int `json:"creator_id" gorm:"column:creator_id;comment:创建人Id;type:int"`
}

type BaseTimeFields struct {
	Ctime time.Time `json:"create_time,omitempty" gorm:"column:create_time;comment:创建时间; <-:create;autoCreateTime"`
	Mtime time.Time `json:"modify_time,omitempty" gorm:"column:modify_time;comment:修改时间; <-;autoUpdateTime"`
}

type BaseTimeFieldsShow struct {
	Ctime time.Time `json:"create_time" gorm:"column:create_time;comment:创建时间;"`
	Mtime time.Time `json:"-" gorm:"column:modify_time;comment:修改时间;"`
}

type BaseFields struct {
	CreatorId int       `json:"creator_id,omitempty" gorm:"column:creator_id;comment:创建人Id;type:int"`
	Ctime     time.Time `json:"create_time,omitempty" gorm:"column:create_time;comment:创建时间; <-:create;autoCreateTime"`
	Mtime     time.Time `json:"modify_time,omitempty" gorm:"column:modify_time;comment:修改时间; <-;autoUpdateTime"`
}

type BaseFieldsShow struct {
	CreatorId int       `json:"creator_id" gorm:"column:creator_id;comment:创建人Id;type:int"`
	Ctime     time.Time `json:"create_time" gorm:"column:create_time;comment:创建时间;"`
	CtimeStr  string `json:"create_time_str" gorm:"-"`
	Mtime     time.Time `json:"-" gorm:"column:modify_time;comment:修改时间;"`
}
